import home from "./home.vue";
import cart from './components/cart/cart.vue';
import news from './components/news/news.vue';
import newsDetail from './components/news/newsDetail.vue';
import my from './components/my/my.vue';
import product from './components/product/product.vue';

export const routes = [
    {
        path:'/',
        components:{
            default:home,
    },name:'首页'},
    {
        path:'/cart',
        components:{
            default:cart,
    },name:'购物车'},
    {
        path:'/news',
        components:{
            default:news,
        },
        children:[
            {path:':id',component:newsDetail},
        ],
    name:'新闻'},
    {
        path:'/my',
        components:{
            default:my,
    },name:'我的'},
    {
        path:'/product',
        components:{
            default:product,
    },name:'产品'}
]